<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<script type="text/javascript">
$(function(){
	validReg("updateForm");
});
</script>

<div class="page-content">
	<!--content-->
	<div class="containerTop">
		<a href="javascript:;" class="a-back"><span class="icon-back" onclick="menuUrl('corp/view', 'corp:page');"></span></a>
		<span>修改机构</span>
	</div>



	<div class="panel charger">
		<form id="updateForm" class="form-horizontal" role="form" onsubmit="return validateCallback(this, corp.update);">
			<div class="numbResult">基本信息</div>
			<input type="hidden" name="id" class="form-control"
				value="${result.data.id }">

			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="col_red">*</span>机构名称：</label>
				<div class="col-sm-10 ">
					<div class="pr">
						<input type="text" name="name" class="form-control"
							placeholder="请输入机构名称" value="${result.data.name }" required data-bv-notempty data-bv-stringlength-max="100"  data-bv-stringlength="true">
					</div>
				</div>
			</div>
									
			<div class="form-group">
				<label class="col-sm-2 control-label">描述：</label>
				<div class="col-sm-10">
					<!--<input type="text" class="form-control" placeholder="请输入办公电话">-->
					<textarea name="note" class="form-control" rows="6" data-bv-stringlength-max="500"  data-bv-stringlength="true">${result.data.note }</textarea>
				</div>
			</div>

			<div class="numbResult">角色列表</div>

			<div class="numbResult" id="numbResult">
				<script type="text/javascript">
					var arr = [];
					<c:forEach items="${result.data.useRoleList }" var ="row" varStatus="status">
				 	arr.push("${row.roleId}");
				 	</c:forEach>
					corp.getSelectRoleList("numbResult", arr);
				</script>
				
			</div>
			<div class="text-center opareBtm">
				<button type="submit"  class="a-btn1">确定</button>
				<button type="button" onclick="menuUrl('corp/view', 'corp:page');"
					class="a-btn1 grey">返回</button>
			</div>
		</form>

	</div>

	<!--end content-->
</div>